package com.haoze.common.enumeration;

/**
 * 状态类枚举
 * @author fcx
 * @date 2019年2月14日15:33:59
 */
public enum CirculationTypeEnum {
    IN_HOSP ("in_hosp","入院"),
    TRANSFERRED_DEPT("transferred_dept","转科"),
    TRANSFERRED_BED("transferred_bed","换床"),
    OUT_HOSP("out_hosp","出院"),
    OPERATION("operation","手术"),
    OUT_IN("out_in","出入");

    private final String code;
    private final String text;

    CirculationTypeEnum(String code, String text) {
        this.code = code;
        this.text = text;
    }

    public String getCode() {
        return code;
    }

    public String getText() {
        return text;
    }

    public static CirculationTypeEnum getType(String dataTypeCode) {
        for (CirculationTypeEnum enums : CirculationTypeEnum.values()) {
            if (enums.code.equals(dataTypeCode)) {
                return enums;
            }
        }
        return null;
    }
}
